﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using QLST_BUS;

namespace QLST_CoopMart_GoVap
{
    public partial class uc_QLTaiKhoan : UserControl
    {
        NHANVIENBUS NVBus = new NHANVIENBUS();
        LOAINHANVIENBUS LoaiNvBus = new LOAINHANVIENBUS();
        
        public uc_QLTaiKhoan()
        {
            InitializeComponent();
        }
        public void LoadNV()
        {
            bdSource.DataSource = NVBus.GetDs();
            bdNavigation.BindingSource = bdSource;
            dgvNhanVien.DataSource = bdSource;            
        }

        public void LoadLoaiNV()
        {
            LoaiNV.DataSource = LoaiNvBus.GetDs();
            LoaiNV.DisplayMember = "TenLoai";
            LoaiNV.ValueMember = "MaLoai";
        }

        private void uc_QLTaiKhoan_Load(object sender, EventArgs e)
        {
            LoadLoaiNV();
            LoadNV();
        }

        private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
        {
            new frmThemNhanVien();
        }

        private void toolStripButton1_Click(object sender, EventArgs e)
        {

        }
    }
}
